<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.

| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});
//注册
Route::get('/reg', 'UserController@relog');
//执行注册
Route::post('/dorelog', 'UserController@dorelog');
//登陆
Route::get('/login', 'UserController@login');
//执行登陆
Route::post('/dologin', 'UserController@dologin');

//检测是否登陆的路由组
Route::group(['middleware'=>'login'], function(){
	Route::get('/shou', 'UserController@shou');
	Route::get('/logout', 'UserController@logout');

});
//图片
Route::get('/tupian', 'UserController@tupian');
//博客
Route::get('/boke', 'UserController@boke');
//添加博客
Route::get('/add', 'UserController@add');
//执行添加
Route::post('/doadd', 'UserController@doadd');
//阅读页面路由
Route::get('/yuedu/{id}', 'UserController@yuedu');
//修改
Route::get('/xiugai/{id}', 'UserController@xiugai');
//执行修改
Route::post('/doxiugai/{id}', 'UserController@doxiugai');
//删除路由
Route::get('/del/{id}', 'UserController@del');
//预览
Route::get('/yulan', 'UserController@yulan');
//遍历
Route::get('/bianli', 'UserController@bianli');
//执行插入数据库
Route::post('/dobianli', 'UserController@dobianli');
//商品列表
Route::get('/gouwu', 'UserController@gouwu');
//加入购物车
Route::get('/addcart/{id}', 'UserController@addcart');
//购物车
Route::get('/cart', 'UserController@che');
//移除
Route::get('/remove/{id}', 'UserController@remove');
//清空
Route::get('/qingkong', 'UserController@qingkong');
//图片上传ajax
Route::get('/xiang','xiangController@index');
Route::post('/xiang','xiangController@Doxiang');
Route::get('/list/{id}','zhaoController@list');
Route::post('/dolist','zhaoController@dolist');
Route::resource('/bianji','zhaoController@bianji');



